Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Efficient implementation of expect for AbstractTTN #129

Merged
merged 9 commits into from
Jan 26, 2024

Conversation

b-kloss
Copy link
Contributor

@b-kloss b-kloss commented Jan 24, 2024

This PR addresses #128 and adds an implementation of expect that should allow evaluation of local observables at all sites in a TTN at linear cost in the number of vertices in the TTN.

Basic tests have been added:

  • comparing with ITensors.expect evaluated on the output of random_mps converted to ITensors.MPS, as well as verifying the Sz
  • expectation value for a product-TTN in the computational basis for a comb_tree.

Open issues:

  • performance testing should be added at some point / optimality of implementation is not verified
  • Currently does not support multiple site-indices per vertex. This could probably easily be addressed similar to the way this is handled in the svd_ttn for converting OpSum to TTN.

@b-kloss
Copy link
Contributor Author

b-kloss commented Jan 24, 2024

I'll fix keyword argument signature that makes the solver_tests fail.

@b-kloss
Copy link
Contributor Author

b-kloss commented Jan 24, 2024

If tests pass this is ready for review.

@mtfishman
Copy link
Member

Looks good, thanks!

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (56fcb93) 72.90% compared to head (36386b9) 72.73%.
Report is 1 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #129      +/-   ##
==========================================
- Coverage   72.90%   72.73%   -0.17%     
==========================================
  Files          71       68       -3     
  Lines        4097     3947     -150     
==========================================
- Hits         2987     2871     -116     
+ Misses       1110     1076      -34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mtfishman mtfishman merged commit e1abe27 into ITensor:main Jan 26, 2024
@b-kloss b-kloss deleted the expect-ttn branch February 2, 2024 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants